import mainLayout from '../components/layout/mainLayout.vue';
import { createRouter, createWebHashHistory } from 'vue-router';

const routes = [
    {
        path: '/',
        component: mainLayout,
        name: 'menuShowItem',
        children: [
            {
                path: '/',
                component: () => import('../views/toubiao/excelJs.vue'),
                name: 'excelJs',
                meta: { title: '计算', icon: 'a_menu_home' },
            },
        ],
    },
    {
        path: '/:path(.*)*',
        redirect: '/404',
    },
    {
        // 404
        path: '/404',
        name: 'notFound',
        component: () => import('@/views/error/404.vue'),
    },
    {
        // 无权限访问
        path: '/401',
        name: 'noPower',
        component: () => import('@/views/error/401.vue'),
    },
];

const router = createRouter({
    history: createWebHashHistory(),
    routes,
});

export default router;
